home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb.new / gdb-4.0 / bfd / doc / format.p < prev    next >
Encoding:
Text File  |  1991-09-29  |  1.7 KB  |  51 lines

  1. /* *i bfd_check_format
  2. This routine is supplied a BFD and a format. It attempts to verify if
  3. the file attached to the BFD is indeed compatible with the format
  4. specified (ie, one of @code{bfd_object}, @code{bfd_archive} or
  5. @code{bfd_core}).
  6.  
  7. If the BFD has been set to a specific @var{target} before the call,
  8. only the named target and format combination will be checked. If the
  9. target has not been set, or has been set to @code{default} then all
  10. the known target backends will be interrogated to determine a match.
  11.  
  12. The function returns @code{true} on success, otherwise @code{false}
  13. with one of the following error codes: 
  14. @table @code
  15. @item 
  16. invalid_operation
  17. if @code{format} is not one of @code{bfd_object}, @code{bfd_archive}
  18. or @code{bfd_core}.
  19. @item system_call_error
  20. if an error occured during a read -  even some file mismatches can
  21. cause system_call_errros
  22. @item file_not_recognised
  23. none of the backends recognised the file format
  24. @item file_ambiguously_recognized
  25. more than one backend recognised the file format.
  26. @end table
  27. */
  28.  PROTO(boolean, bfd_check_format, (bfd *abfd, bfd_format format));
  29.  
  30. /*
  31.  
  32. *i bfd_set_format
  33. This function sets the file format of the supplied BFD to the format
  34. requested. If the target set in the BFD does not support the format
  35. requested, the format is illegal or the BFD is not open for writing
  36. than an error occurs.
  37. */
  38.  PROTO(boolean,bfd_set_format,(bfd *, bfd_format));
  39.  
  40. /*
  41.  
  42. *i bfd_format_string
  43. This function takes one argument, and enumerated type (bfd_format) and
  44. returns a pointer to a const string "invalid", "object", "archive",
  45. "core" or "unknown" depending upon the value of the enumeration.
  46. */
  47.  PROTO(CONST char *, bfd_format_string, (bfd_format));
  48.  
  49. /*
  50. */
  51.